#ifndef _CTHREAD_WORK_THREAD_FACTORY_H_
#define _CTHREAD_WORK_THREAD_FACTORY_H_

#include "thread.h"
#include "thread_pool.h"

namespace CThread
{

class ThreadPool;

class WorkThread : public Thread
{
public:
	WorkThread(ThreadPool* pThreadPool);
	virtual ~WorkThread(){};
	void run();	
	bool isActive();

protected:
	ThreadPool* m_pThreadPool;
	bool m_bIdle;
};

class WorkThreadFactory
{
public:
	
	virtual WorkThread* CreateWorkThread (ThreadPool* pThreadPool) 
	{
		return new WorkThread(pThreadPool);
	}
};


};

#endif // 

